package Test;

import Uitl.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;
import pojo.Category;

public class AAA {
    @Test
    public void findCategoryTest(){
        //通过工具类生成SqlSession对象
        SqlSession session = MyBatisUtils.getSession();
        //查询id为2的商品类别信息
        Category category = session.selectOne("findCategoryWithProduct",2);
        //输出查询结果
        System.out.println(category);
        //关闭SqlSession
        session.close();
    }

}
